$(function(){
    var CirculateShow = function(target,width,height){
	$(target).css('overflow','hidden');
	$(target).width(width);
	$(target).height(height);
	
	var self = this;
	this.buttons = $(target).children('ul').find('li > a');
	this.table = $(target).children('table');
	
	$(this.buttons).each(function(index){
	    $(this).click(function(){
		Z.log(index);
		$(self.table).animate({
		    'margin-left' : - index * width + 'px'
		},300);
		return false;
	    });
	});
    };
    
    new CirculateShow($('.z-circulate-show'),700,380);
});